﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nomad.WebSync.Windows.Properties;

namespace Nomad.WebSync.Windows.Services {
    static class Desktop {
        public static string url {
            get {
                if (String.IsNullOrEmpty(Settings.Default.Service))
                    return Settings.Default.Nomad_WebSync_Windows_WebSyncService_Desktop;
                else
                    return Settings.Default.Service;
            }
        }

        public static WebSyncService.Desktop Connect() {
            var service = new WebSyncService.Desktop();
            service.WebSyncHeaderValue = App.WebSyncHeader;
            service.Url = Desktop.url;
            return service;
        }
    }
}
